<?php
/**
 * @author spenceryg
 * @date 2023/6/11
 * @time 12:42 下午
 * @focus love & life
 */


namespace app\admin\controller;


use Liaosp\Tool\Spider\Wechat\WxCrawler;

class Tool extends \app\BaseController
{
    public function GetWxCrawler()
    {
        $url = input('url');
        $obj = new \app\common\lib\WxCrawler();
        $content =$obj->crawByUrl($url);
        if ($content['content_html']) {
            $this->success($content);
        } else {
            $this->error("抓取失败！");
        }
    }
}
